|
|
|
|
|
|
|
alphabets used in the world today, including several antiquated languages such as Sanskrit and Egyptian hieroglyphs. Unicode also includes representations for punctuation marks, mathematical symbols, and dingbats fonts. This leaves substantial room for future expansion, so when the aliens finally land, you can add their language to your application. |
|
|
|
|
|
|
|
|
Because Visual Basic is a 32-bit application, it uses Unicode for all its string manipulation. This can lead to problems with some of the older Windows API calls that still use the ANSI string characters. Fortunately, Visual Basic includes a function called StrConv() to perform conversions between Unicode and ANSI. You can use this function when working with the Windows API. |
|
|
|
|
|
|
|
|
Sources for Windows API Information |
|
|
|
|
|
|
|
|
If I were you, I would immediately invest in one book for learning Windows API callsVisual Basic Programmers Guide to the Win32API, by Daniel Appleman (see Appendix A, VBA Programming Standards, for more information). This book is considered by most Visual Basic programmers to be the bible for using the Windows API with Visual Basic. It explains how to use most of the Windows API calls that are useful with Visual Basic, and it also explains which ones cannot be used. |
|
|
|
|
|
|
|
|
Many other reference manuals for the Windows API are available; however, most of them are geared towards C language programmers. If youre a member of the Microsoft Developers Network, youll have the complete Windows SDK at your fingertips on the CD-ROMs you receive every quarter. However, this wont do you much good unless you know what youre looking for and know about the C language. In this chapter, I explain the basics of how to use the Windows API calls. With this introduction and Applemans book, youll be ready to dive right in and create some great Windows applications. |
|
|
|
|
|
|
|
|
Declaring API Functions to Visual Basic |
|
|
|
|
|
|
|
|
Prior to using any of the Windows API functions, you must declare your intention to use them to Visual Basic. You can use all the functions in Visual Basic without any declarations because theyre built into the Visual Basic language. For any external function that Visual Basic does not know about, youll need to tell Visual Basic |
|
|
|
|
|